﻿<phone:PhoneApplicationPage
    x:Class="Studio77.GuessTheWords2.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="False">
	<phone:PhoneApplicationPage.Resources>
		<Style x:Key="ButtonStyleStartGame" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image1">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="MouseOver"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Image x:Name="image" Source="/Images/btn_start.png" Stretch="Fill"/>
							<Image x:Name="image1" Source="/Images/btn_start_press.png" Stretch="Fill" Visibility="Collapsed"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ButtonStyleContinue" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid x:Name="grid">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image1">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimation Duration="0" To="0.7" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="MouseOver"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Image x:Name="image" Source="/Images/btn_continue.png" Stretch="Fill"/>
							<Image x:Name="image1" Source="/Images/btn_continue_press.png" Stretch="Fill" Visibility="Collapsed"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ButtonStyleSoundOn" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="MouseOver"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Image Source="/Images/btn_sound_on.png" Stretch="Fill"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ButtonStyleSoundOff" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="MouseOver"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Image Source="/Images/btn_sound_off.png" Stretch="Fill"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ButtonStyle4" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Pressed">
										<Storyboard>
											<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
											<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
											<DoubleAnimation Duration="0" To="1.05" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="border" d:IsOptimized="True"/>
											<DoubleAnimation Duration="0" To="1.05" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
											<DoubleAnimation Duration="0" To="1.05" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="border" d:IsOptimized="True"/>
											<DoubleAnimation Duration="0" To="1.05" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
											<ColorAnimation Duration="0" To="#FF6C6C6C" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="MouseOver"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Border x:Name="border" BorderBrush="#FF400000" BorderThickness="2" HorizontalAlignment="Left" Height="51" VerticalAlignment="Top" Width="204" CornerRadius="7" RenderTransformOrigin="0.5,0.5">
								<Border.RenderTransform>
									<CompositeTransform/>
								</Border.RenderTransform>
								<Border.Background>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FFF55858" Offset="0"/>
										<GradientStop Color="#FF910606" Offset="1"/>
										<GradientStop Color="#FF660900" Offset="0.168"/>
									</LinearGradientBrush>
								</Border.Background>
							</Border>
							<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RenderTransformOrigin="0.5,0.5">
								<ContentPresenter.RenderTransform>
									<CompositeTransform/>
								</ContentPresenter.RenderTransform>
							</ContentPresenter>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ButtonStyleClose" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid x:Name="grid" RenderTransformOrigin="0.5,0.5">
							<Grid.RenderTransform>
								<CompositeTransform/>
							</Grid.RenderTransform>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Pressed">
										<Storyboard>
											<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
											<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
											<DoubleAnimation Duration="0" To="1.05" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
											<DoubleAnimation Duration="0" To="1.05" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="MouseOver"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Ellipse Width="37" VerticalAlignment="Top" Stroke="White" Height="37" HorizontalAlignment="Left" Fill="#FF890000"/>
							<Path Width="20.254" VerticalAlignment="Center" UseLayoutRounding="False" StrokeThickness="5" Stroke="White" Stretch="Fill" Height="20.254" HorizontalAlignment="Center" Fill="#FF890000" Data="M265,10 L284.254,29.2542"/>
							<Path Width="20.254" VerticalAlignment="Center" UseLayoutRounding="False" StrokeThickness="5" Stroke="White" Stretch="Fill" RenderTransformOrigin="0.5,0.5" Margin="8.373" Height="20.254" HorizontalAlignment="Center" Fill="#FF890000" Data="M265,10 L284.254,29.2542">
								<Path.RenderTransform>
									<CompositeTransform Rotation="90"/>
								</Path.RenderTransform>
							</Path>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ButtonStyleNewUser" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image1">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="MouseOver"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Image x:Name="image" Source="Images/newpackage.png" Stretch="Fill"/>
							<Image x:Name="image1" Source="Images/newpackage_press.png" Stretch="Fill" Visibility="Collapsed"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Storyboard x:Name="StoryboardShowPackage">
        	<DoubleAnimation Duration="0:0:0.4" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="bdrNewUser" d:IsOptimized="True"/>
        </Storyboard>
        <Storyboard x:Name="StoryboardHidePackage">
        	<DoubleAnimation Duration="0:0:0.4" To="-800" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="bdrNewUser" d:IsOptimized="True"/>
        </Storyboard>
	</phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Viewbox>
		<Grid x:Name="LayoutRoot" Background="Transparent" Height="800" Width="480">
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="*"/>
			</Grid.RowDefinitions>
			<Image Grid.RowSpan="2" Source="/Images/main_background.png" Stretch="Fill"/>
			<Button Click="Button_Click_1" Content="Button" Height="99" Margin="166,292,28,409" Grid.RowSpan="2" Style="{StaticResource ButtonStyleStartGame}" Width="286"/>
			<Button x:Name="btnContinue" Click="Button_Click_2" Content="Button" Height="82" Margin="203,412,34,306" Grid.RowSpan="2" Style="{StaticResource ButtonStyleContinue}" Width="243"/>
			<Button x:Name="btnSoundOn" Click="btnSoundOn_Click" Content="Button" Margin="10,737,417,10" Grid.RowSpan="2" Style="{StaticResource ButtonStyleSoundOn}"/>
			<Button x:Name="btnSoundOff" Click="btnSoundOff_Click" Content="Button" Margin="10,737,417,10" Grid.RowSpan="2" Style="{StaticResource ButtonStyleSoundOff}" Visibility="Collapsed"/>
			<Button x:Name="btnNewUser" Content="Button" Margin="218,511,28,201" Grid.RowSpan="2" Style="{StaticResource ButtonStyleNewUser}" Click="btnNewUser_Click"/>
			<Border x:Name="bdrNewUser" BorderBrush="Black" BorderThickness="1" Margin="0" Background="#CC000000" RenderTransformOrigin="0.5,0.5" Grid.RowSpan="2">
				<Border.RenderTransform>
					<CompositeTransform TranslateY="-800"/>
				</Border.RenderTransform>
				<Border BorderBrush="White" BorderThickness="1" HorizontalAlignment="Center" Height="358" VerticalAlignment="Center" Width="300" Background="#99E8E8E8" CornerRadius="10">
					<Grid>
						<Image Source="light_bulb.png" Stretch="Fill" HorizontalAlignment="Center" Width="89" Height="89" VerticalAlignment="Top" Margin="67,10,142,0"/>
						<Grid Margin="0,114,0,162" RenderTransformOrigin="0.5,0.5">
							<Grid.RenderTransform>
								<CompositeTransform TranslateX="1.5" TranslateY="1.5"/>
							</Grid.RenderTransform>
							<TextBlock HorizontalAlignment="Center" Margin="61,0" TextWrapping="Wrap" Text="给五星好评" VerticalAlignment="Top" Foreground="Black" FontSize="24"/>
							<TextBlock HorizontalAlignment="Center" Margin="0,48,0,0" TextWrapping="Wrap" Text="即可获取50个提示道具" VerticalAlignment="Top" Foreground="Black" FontSize="24"/>
						</Grid>
						<Grid Margin="0,114,0,162">
							<TextBlock HorizontalAlignment="Center" Margin="61,0" TextWrapping="Wrap" Text="给五星好评" VerticalAlignment="Top" Foreground="#FFFFE800" FontSize="24"/>
							<TextBlock HorizontalAlignment="Center" Margin="0,48,0,0" TextWrapping="Wrap" Text="即可获取50个提示道具" VerticalAlignment="Top" Foreground="#FFFFE800" FontSize="24"/>
						</Grid>
						<Button x:Name="btnGetMB" Click="btnGetMB_Click_1" Content="领取" HorizontalAlignment="Center" Margin="47,275,47,0" VerticalAlignment="Top" Style="{StaticResource ButtonStyle4}"/>
						<Button x:Name="btnCloseGift" Click="btnCloseGift_Click_1" Content="Button" Margin="256,3,5,316" Style="{StaticResource ButtonStyleClose}"/>
						<TextBlock HorizontalAlignment="Left" Margin="161,35,0,0" TextWrapping="Wrap" Text="×50" VerticalAlignment="Top" FontSize="48" Foreground="White"/>
					</Grid>
				</Border>
			</Border>

			<!-- 本地化说明:
            若要本地化显示的字符串，请将其值复制到应用程序的非特定语言资源文件(AppResources.resx)
            中的适当命名的键，然后
            将属性的引号之间的硬编码文本值
            替换为其路径指向该字符串名称的绑定子句。

            例如:

                Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"

            此绑定指向模板的名为“ApplicationTitle”的字符串资源。

            在“项目属性”选项卡中添加受支持的语言将会为
            每种语言创建一个新的 resx 文件，该文件可以包含 UI 字符串的翻译值
            。这些示例中的绑定将导致在运行时从
            与应用程序的 CurrentUICulture 匹配的 .resx 文件中
            提取属性的值。
         -->

			<!--TitlePanel 包含应用程序的名称和页标题-->

			<!--ContentPanel - 在此处放置其他内容-->

			<!--取消注释，以显示对齐网格，从而帮助确保
            控件在公用边界上对齐。图像在系统栏中显示时的
            上边距为 -32px。如果隐藏了系统栏，则将此值设为 0
            (或完全删除边距)。

            在发送之前删除此 XAML 和图像本身。-->
			<!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" />-->
		</Grid>

	</Viewbox>

</phone:PhoneApplicationPage>